package com.group5.onlinegame.service;

import com.group5.onlinegame.dao.IModulesDao;
import com.group5.onlinegame.dao.IUserRoleDao;
import com.group5.onlinegame.entity.Modules;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Set;

@Service
public class PowerService implements IPowerService {

    @Resource
    private IUserRoleDao userRoleDao;
    @Resource
    private IModulesDao modulesDao;

    @Override
    public Set<String> getUserRole(String username) {
        System.out.println(userRoleDao.getUserRole(username));
        return userRoleDao.getUserRole(username);
    }

    @Override
    public List<Modules> getmainmodule(String username) {
        return modulesDao.getmainmodule(username);
    }

    @Override
    public List<Modules> getsonmodule() {
        return modulesDao.getsonmodule();
    }
}
